# Maintainer:
# Contributor: Eric Bélanger <eric@archlinux.org>

pkgname=cln
pkgver=1.3.6
pkgrel=4
pkgdesc="Class library for numbers"
arch=('loong64' 'x86_64')
url="https://www.ginac.de/CLN/"
license=('GPL')
depends=('gmp')
makedepends=('texlive-latex')
source=(https://www.ginac.de/CLN/${pkgname}-${pkgver}.tar.bz2
        cln-la64.patch)
sha256sums=('f492530e8879bda529009b6033e1923c8f4aae843149fc28c667c20b094d984a'
            '8cea3f49ab301dff766450bfdbff3ac4e5bf64cb60307f73681267aa151bb6c5')

prepare() {
	cd "$pkgname-$pkgver"
	patch -p1 -i "$srcdir/cln-la64.patch"
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr
  make all html pdf
}

check() {
  cd ${pkgname}-${pkgver}
  make check
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install install-html install-pdf
}
